Skip to content

[pull] master from supabase:master - #1131

Merged
pull[bot] merged 2 commits into
code:masterfrom
supabase:master
Aug 1, 2026
Merged

[pull] master from supabase:master#1131
pull[bot] merged 2 commits into
code:masterfrom
supabase:master

Conversation

@pull

@pull pull Bot commented Aug 1, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

seanoliver and others added 2 commits July 31, 2026 15:37
#48515)

## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Telemetry feature.

## What is the current behavior?

- Session replay is off, and nothing in the code keeps it off.
- `packages/common/posthog-client.ts` sets no recording config at all.
- So PostHog's project setting alone decides, for every app sharing that
project.
- Studio, www and docs share one project.
- Studio shows customer data almost everywhere: SQL editor, table rows,
connection strings, API keys.
- posthog-js masks inputs by default. It does not mask rendered text.
- [GROWTH-1055](https://linear.app/supabase/issue/GROWTH-1055)

## What is the new behavior?

- `posthogClient.init()` takes a masking config, and disables recording
when it gets none.
- Studio passes one behind `NEXT_PUBLIC_POSTHOG_SESSION_REPLAY`.
- Every other app passes nothing, so it never loads the recorder.
- Studio masks all text and all inputs.
- `data-ph-capture="true"` opts one element's text back in. Unused so
far.
- Canvas is blocked, because it records as images that text masking
cannot reach.
- Query strings and fragments are stripped from recorded URLs, where
auth callbacks carry tokens.
- Request and response bodies are never recorded.
- Console logs are never recorded, since masking only reaches DOM text.
- Masking is set in code, so PostHog's settings cannot loosen it.
- Consent gating is unchanged. Nothing records before a user accepts.

## Additional context

- Recording needs three things: this env var, the PostHog project
toggle, and user consent.
- All three are off or unset, so merging this changes nothing at
runtime.
- `NEXT_PUBLIC_POSTHOG_SESSION_REPLAY` goes into Vercel on Preview scope
first, to test on a preview build.
- Production scope comes later, once we are ready to record there.
- `NEXT_PUBLIC_*` is inlined at build time, so each scope needs a
rebuild afterwards.
- Text inside HTML attributes (`title`, `alt`, `href`) is still recorded
as-is.
- posthog-js exposes no hook for masking attributes, so covering it
needs `ph-no-capture` per component.
- Staging has no server-side masking config, so that is where this gets
verified.
- Plan: enable recording on staging, verify masked text on a preview,
then decide on production.
- Network timing stays on for the dashboard performance work. Payloads
stay off.
- Tests cover both masking functions and the config values.

## Screenshots


https://github.com/user-attachments/assets/aa064a04-f977-4453-a3da-2fe0cdcead08

<img width="889" height="651" alt="CleanShot 2026-07-31 at 10 13 43"
src="https://github.com/user-attachments/assets/f1d07946-fd68-42b2-89f1-d201bc605638"
/>



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

* **New Features**
  * Added privacy-focused session replay for Studio.
* Text and form inputs are masked by default, with explicit opt-in
capture.
  * Network recordings remove query strings and fragments.
  * Headers, request bodies, canvas data, and console logs are excluded.

* **Bug Fixes**
  * Improved whitespace and capture-attribute handling during masking.
* Session replay remains disabled without a masking policy or explicit
enablement.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
…48557)

## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

This is a docs update. The shared architecture diagram and several docs
pages still described Kong as Supabase's API gateway, even though the
hosted platform has run Envoy since 2025. Both diagram variants are
rebuilt with real, accessible text — the originals rendered every label
as an outlined vector path with zero `<text>` elements — so the gateway
name can be kept current going forward, and the platform-facing prose
that named Kong directly is updated to Envoy.

Closes DOCS-1262.

## What is the current behavior?

- The architecture diagram (used on the Architecture overview, Auth
architecture, Self-hosting Docker, and Contributing guide pages) shows
"KONG / docs.konghq.com" as the gateway box
- The Architecture overview page has a "Kong (API gateway)" component
section
- The Auth architecture page states "Kong API gateway. This is shared
between all Supabase products."
- `README.md` and `apps/docs/public/humans.txt` credit Kong instead of
Envoy

## What is the new behavior?

- Rebuilt `supabase-architecture.svg` and
`supabase-architecture--light.svg` with real `<text>` elements; the
gateway box now reads "ENVOY / envoyproxy.io" with identical layout,
colors, and shadows otherwise
- Updated the diagram alt text and the "Kong (API gateway)" section (now
"Envoy (API gateway)", with the correct docs link, license, and
language) on the Architecture overview page
- Updated the "Kong API gateway" bullet and diagram alt text on the Auth
architecture page
- Updated the Kong credit to Envoy in `README.md` and
`apps/docs/public/humans.txt`

**Intentionally excluded:**

- Self-hosted Docker Compose pages (`docker.mdx`, `enable-mcp.mdx`,
`self-hosted-auth-keys.mdx`, `self-hosted-envoy.mdx`,
`self-hosted-functions.mdx`, `self-hosted-proxy-https.mdx`) — these
describe the self-hosted stack, which still defaults to Kong today and
is already owned by an open PR (#48153) that flips that default
- `i18n/README.*.md` (29 files) — translation risk without
native-speaker review; only the English `README.md` was updated

## Open questions

- [ ] #48153 merges and the self-hosted default actually flips to Envoy
— once it does, revisit the self-hosting Docker Compose pages excluded
from this PR and the self-hosting-analytics reference TODO
- [ ] Confirm whether all legacy platform instances have fully migrated
to Envoy — until then, this PR's wording says "Envoy" without claiming
Kong is gone everywhere (some legacy instances may still silently be on
Kong)
- [ ] Current Envoy response header names confirmed for the logs guide
TODO (`x-kong-proxy-latency` / `x-kong-upstream-latency`)
- [ ] i18n README translations (29 files) follow up separately with
native-speaker review

## Additional context

- Verification: rendered both new SVGs with `rsvg-convert` and visually
diffed against the originals — layout, spacing, colors, and shadows are
pixel-equivalent; only the top-box label text changed

| Check | Result |
| --- | --- |
| `rsvg-convert` render, dark variant | pass — diagram unchanged except
gateway label |
| `rsvg-convert` render, light variant | pass — diagram unchanged except
gateway label |
| Preview URL, Architecture overview | pass — 200 |
| Preview URL, Auth architecture | pass — 200 |

### Before & After

#### [Architecture
overview](https://supabase.com/docs/guides/getting-started/architecture)

| [Before
(production)](https://supabase.com/docs/guides/getting-started/architecture)
| [After (PR
preview)](https://docs-git-nikrichers-docs-1262-architecture-docs-84e339-supabase.vercel.app/docs/guides/getting-started/architecture)
|
| --- | --- |
|
![Before](https://moijyfpvgnmgoxvwcikq.supabase.co/storage/v1/object/public/pr-proof/supabase/supabase/pr48557/getting-started-before-crop-a67d5681.png)
|
![After](https://moijyfpvgnmgoxvwcikq.supabase.co/storage/v1/object/public/pr-proof/supabase/supabase/pr48557/getting-started-after-crop-7d2b027a.png)
|

#### [Auth
architecture](https://supabase.com/docs/guides/auth/architecture)

| [Before
(production)](https://supabase.com/docs/guides/auth/architecture) |
[After (PR
preview)](https://docs-git-nikrichers-docs-1262-architecture-docs-84e339-supabase.vercel.app/docs/guides/auth/architecture)
|
| --- | --- |
|
![Before](https://moijyfpvgnmgoxvwcikq.supabase.co/storage/v1/object/public/pr-proof/supabase/supabase/pr48557/auth-before-c68a7267.png)
|
![After](https://moijyfpvgnmgoxvwcikq.supabase.co/storage/v1/object/public/pr-proof/supabase/supabase/pr48557/auth-after-3de5c4c5.png)
|

### Test plan

- [ ] Diagram renders correctly in both light and dark mode on the
preview
- [ ] "Envoy (API gateway)" section reads correctly on the Architecture
overview page
- [ ] Auth architecture bullet reads "Envoy API gateway"
- [ ] The two TODO-marked follow-ups (logs guide,
self-hosting-analytics) are acceptable to leave for later rather than
block this PR

---------

Co-authored-by: Nik Richers <nik@validmind.ai>
Co-authored-by: Miranda Limonczenko <miranda.limonczenko@supabase.io>
@pull pull Bot locked and limited conversation to collaborators Aug 1, 2026
@pull pull Bot added the ⤵️ pull label Aug 1, 2026
@pull
pull Bot merged commit 3a36610 into code:master Aug 1, 2026
2 of 17 checks passed
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

⤵️ pull documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants